Qrencode QR code generation library function usage experience, qrencode Library Function
Development Environment:
Linux: ubuntu 14.04Cross-compilation tool: gcc-4.4.3Arm Development Board: mini2440Arm kernel version: linux-3.4.99
Recently, the company's project needs to implement the string generation QR code function on the display function platform. After searching online, there is an open-source QR code
Development Environment: Linux: Ubuntu 14.04Cross-compilation tool: gcc-4.4.3Arm Development Board: mini2440ARM kernel version: linux-3.4.99 Recently, the company's project needs to implement the string generation QR code function on the display function platform. After searching online, there is an open-source QR code C function library qrencode under the Linux platform. So we attempted to port the source code. Download the
$url = http://test.php;//qr code for the jump address$qrcode _path = './img/test123.jpg ';//The Save path and name of the QR code (under Linux if only the specified path will generate a QR code under the PHP executable file, write the path and name complete)$qrcode = "/usr/bin/qrencode-o $qrcode _path $url";//Generate two-dimensional code command $qrcode_path QR code path address of theEXEC ($qrcode, $output, $result)//php execute Linux command to gen
This is a created
article in which the information may have evolved or changed.
Package Listen Utilimport ("Github.com/qpliu/qrencode-go/qrencode" "image/png" "io" "net/http") const Listen (Eclevelm listen = Listen to Qrencode. Eclevel (0) Eclevell listen = listen to Qrencode. Eclevel (1) Eclevelh listen = listen to
Python generates QR codes. common modules include pyqrencode and qrcode.
1. Use the pyqrencode module to generate a QR code
Installing the pyqrencode module is complex and relies on many things. The following installation process is summarized after testing:
1. Download Cython: https://pypi.python.org/packages/source/C/Cython/Cython-0.19.1.tar.gz
Install: tar-zxf Cython-0.19.1.tar.gz cd Cython-0.19.1 python setup. py install
2. Download qrencode
, qmake Qzxing.pro 2, QMAKE-TP v-r)
Using the VS Open sln file for compilation, eventually generating the associated DLL, LIB, and PDB files, as shown in 3, I only show the files produced under release
Figure 3 Qzxing compilation resultsIv. Compilation of qrencode-3.1.0Under Windows based on Qrencode can be generated QR code, I refer to a few articles to compile, the article list is as follows:VS20
Original link: http://wowubuntu.com/qrencode.html# Author: Riku//This article uses cc BY-NC-SA 2.5 license, reprint please indicate this article link.For the QR code everyone should be not unfamiliar, the English name 2-dimensional bar code or QR code, is a graphic information technology, the most common is applied to mobile phone applications. Users through the mobile phone camera scan two-dimensional code or enter the QR code below the number, keywords can achieve fast mobile internet access,
mercurial #安装
Third, install the Google Authenticator Pam plugin
Cd/usr/local/src
wget https://google-authenticator.googlecode.com/files/libpam-google-authenticator-1.0-source.tar.bz2
Note: Open Google need to flip the wall, you can find a way to download a good libpam-google-authenticator-1.0-source.tar.bz2 upload to the/USR/LOCAL/SRC directory for installation
Tar jxvf libpam-google-authenticator-1.0-source.tar.bz2 #解压
CD libp
Use Google-Authenticator to enhance server SSH LoginFor people who need special encryption, I will provide a method for Google-based encryption.
The procedure is as follows:
Preparation:First, prepare the client on your mobile phone (Baidu download by yourself)Run the following command:Date: view system timeDate-s 03/04/2013 (set the system date to January 1, March 04, 2013)Date-s (set the system time to am)After modification, execute clock-w to forcibly write the time to COMS!
// Download
I wrote a Qt QR Code Display Control, qtqr.
A recent project needs to display the QR code, so it took some time (only one night, but not perfect) to write a widget that displays the QR code. Of course, this control uses some open-source code, such as qrencode, so I plan to open-source my code.
My code references
Http://stackoverflow.com/questions/21400254/how-to-draw-a-qr-code-with-qt-in-native-c-c
It is basically written according to the above ideas.
QR code in today is quite popular, making two-dimensional code is not difficult, there are many Web sites to make two-dimensional code, input information, immediately converted to two-dimensional code. However, it is not so easy to make a QR code of our own according to the information. The online rough find the next source, almost exclusively is the java/c# version, which for the STM32 chip project does not help much. Finally, I found the Qrencode so
Build a QR code generator with the LUA nginx module author Vinoca Bushi October 31, 2014If there is a VPS, or open-source router, install a nginx, add Lua-nginx-module, and then compile and install Qrencode for LUA, with the following LUA code, access to Http://youip/qr?t=hello can see the effect: LocalQr=Require"Qrencode " local args = ngx req. Get_uri_args () ngx. (qr { text = args. T or "text" , size
my installation, the relevant documents are actually quite many, the steps are quite simple, merely barThe first is the environment preparation, I am the perennial self-owned virtual machine: 2 units centos6.7 minimized installation1. Installation mode, CENTOS6 environment1) Epel originated with Google-authenticator, can be installed directly yum, it is so simple roughRPM-IVH Https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmyum Install Google-authenticator2) on GitHub d
: OS. name
That is to say, you can use WebView to call some local Apis. of course, you must first write those functions in Java.
Now the entire running mode of PHPDroid is clear. when the application is started, run start. sh randomly generates and records the UserAgent (ua. php), find the available port and record it (port. php), and then start the PHP built-in HTTP server and record the PID (used to disable). before starting WebView in Java, read the UserAgent randomly generated and setUserAge
library provided by the official website, we only need to use phpqrcode.php to generate the QR code, of course, your PHP environment must turn on support GD2. Phpqrcode.php provides a key PNG () method, where the parameter $text represents the generation of two-bit information text, the parameter $outfile indicates whether to output a QR code picture file, the default is no, the parameter $level indicates fault tolerance, that is, the covered area can be recognized, respectively L (qr_eclevel_l
The compilation environment is to install CENTOS7 mirrors in Vmware12, choose to create a virtual machine before adding a mirror, and you need to check the necessary development environment and tool options when adding mirrors.
1. Download Bitcoin source
git clone https://github.com/bitcoin/bitcoin.git
The Official document HTTPS://GITHUB.COM/BITCOIN/BITCOIN/BLOB/MASTER/DOC/BUILD-UNIX.MD has detailed compilation and dependency instructions
2. Obtaining dependent dependencies
According to the of
the two-dimensional code and display it.
Copy Code code as follows:
public static function png ($text, $outfile =false, $level =qr_eclevel_l, $size =3, $margin = 4,
$saveandprint =false)
{
$enc = Qrencode::factory ($level, $size, $margin);
Return $enc->encodepng ($text, $outfile, $saveandprint =false);
}
Invoking PHP QR code is very simple, and the following code generates a two-dimensional code with the content "Http://ww
: http://sourceforge.net/projects/phpqrcode/
Use case, the code is as follows:
# Create a two-dimensional code file
Copy Code code as follows:
QRCode::p ng (' Code data text ', ' filename.png ');
# Generate pictures to Browser
Copy Code code as follows:
QRCode::p ng (' some othertext 1234 ');
3.libqrencode
Address: http://fukuchi.org/works/qrencode/index.en.html
4.QRcode Perl CGI PHP Scripts
Address: http://
fault tolerance, that is, the covered area can be recognized, respectively L (qr_eclevel_l,7%), M (qr_eclevel_m,15%), Q (qr_eclevel_q,25%), H (qr_eclevel_h,30%), parameter $size indicates the image size is generated, default is 3; Margin indicates the spacing value of the border space around the QR code, and the parameter $saveandprint indicates whether to save the QR code and display it.public static function png ($text, $outfile =false, $level =qr_eclevel_l, $size =3, $margin =4, $saveandprin
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.